package com.hjqjl.module_home.ui;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.blankj.utilcode.util.ToastUtils;
import com.hjqjl.module_home.databinding.HomeFragmentBinding;
import com.hjqjl.module_home.ui.custom.CustomViewActivity;
import com.hjqjl.module_home.ui.feature.FeatureStylesActivity;
import com.hjqjl.module_home.ui.list.ListSelectActivity;
import com.hjqjl.module_home.ui.tablayout.TabLayoutActivity;
import com.hjqjl.module_home.ui.tablayout.TabVPActivity;
import com.hjqjl.whapplib.base.BaseFragment;
import com.hjqjl.whapplib.router.RouterPath;


@Route(path = RouterPath.HOME_HOME_FRAGMENT)
public class HomeFragment extends BaseFragment<HomeFragmentBinding> {

    @Override
    public void initListener() {
        pVBinding.homeBtnHome1.setOnClickListener(v -> ToastUtils.showShort("点击了按钮"));
        pVBinding.launcherBtnMainToDemoa.setOnClickListener(v -> ARouter.getInstance().build(RouterPath.DEMOA_MAIN).navigation());
        pVBinding.launcherBtnMainToDemob.setOnClickListener(v -> ARouter.getInstance().build(RouterPath.DEMOB_MAIN).navigation());
        pVBinding.launcherBtnMainToLauncher.setOnClickListener(v -> ARouter.getInstance().build(RouterPath.LAUNCHER_MAIN).navigation());
        pVBinding.homeBtnHomeCustomView.setOnClickListener(v -> CustomViewActivity.start(getActivity()));
        pVBinding.homeBtnHomeTabLayout.setOnClickListener(v -> TabLayoutActivity.start(getActivity()));
        pVBinding.homeBtnHomeTabViewPager.setOnClickListener(v -> TabVPActivity.start(getActivity()));
        pVBinding.homeBtnHomePermission.setOnClickListener(v -> PermissionActivity.start(getActivity()));
        pVBinding.homeBtnHomeNetwork.setOnClickListener(v -> NetWorkActivity.start(getActivity()));
        pVBinding.homeBtnHomeFeature.setOnClickListener(v -> FeatureStylesActivity.start(getActivity()));
        pVBinding.homeBtnHomeDate.setOnClickListener(v -> DateActivity.start(getActivity()));
        pVBinding.homeBtnHomeList.setOnClickListener(v -> ListSelectActivity.start(getActivity()));
        pVBinding.homeBtnHomeMyScrollView.setOnClickListener(v -> MyScrollViewActivity.start(getActivity()));
        pVBinding.homeBtnHomeSpinner.setOnClickListener(v -> SpinnerActivity.start(getActivity()));
        pVBinding.homeBtnHomePhoto.setOnClickListener(v -> PhotoActivity.start(getActivity()));
        pVBinding.homeBtnHomeImage.setOnClickListener(v -> ImageActivity.start(getActivity()));
    }
}
